<!DOCTYPE html>
<html lang="en">
<head>


    <!--<script>-->

        <!--//不包含缓存的ajax请求函数-->
        <!--AjaxObject = {-->
            <!--// 回调函数可选 可不选-->
            <!--get: function (url, data, successCallBack, failureCallBack) { //包含参数的url-->

                <!--//请求数据 至少请求三次-->
                <!--if (typeof data == "object") {-->
                    <!--url = this.encodeGetData(url, data);-->
                <!--} else {-->
                    <!--console.error("传入参数格式错误!需要传入对象参数！");-->
                <!--}-->

                <!--var sendCount = 0;-->
                <!--var xhr = new XMLHttpRequest();-->
                <!--xhr.onreadystatechange = function () {-->
<!--//                    if (this.readyState == 4) {-->
<!--//                        if ((this.status >= 200 && this.status < 300) || this.status == 304) {-->
<!--//                            var res = JSON.parse(this.responseText);-->
<!--//                            if (typeof   successCallBack == "function") {-->
<!--//                                successCallBack(res);-->
<!--//                            }-->
<!--//                        } else {-->
<!--//                            if (++sendCount < 3) { //额外请求2次作为请求的补充-->
<!--//                                // console.log(url);-->
<!--//                                xhr.open("get", url, true);-->
<!--//                                xhr.send(null);-->
<!--//                            } else {-->
<!--//                                if (typeof  failureCallBack == "function") {-->
<!--//                                    failureCallBack();-->
<!--//                                }-->
<!--//-->
<!--//                            }-->
<!--//                        }-->
<!--//                    }-->
                <!--};-->
                <!--xhr.open("get", url, true);-->
                <!--xhr.send(null);-->

            <!--},-->
<!--//ajax get请求参数encode处理-->
            <!--encodeGetData: function (urlStr, dataObject) {-->

                <!--for (var prop in dataObject) {-->
                    <!--var encodeProp = encodeURIComponent(prop);-->
                    <!--var encodeValue = encodeURIComponent(dataObject[prop]);-->
                    <!--urlStr += (urlStr.indexOf("?") == -1 ? "?" : "&");-->
                    <!--var dataStr = encodeProp + "=" + encodeValue;-->
                    <!--urlStr += dataStr;-->
                <!--}-->
                <!--return urlStr;-->
            <!--}-->

        <!--};-->
        <!--function log1(message) {-->
            <!--if (!message) {-->
                <!--message = "无效的调试信息";-->
            <!--}-->
            <!--AjaxObject.get("http://192.168.1.119:8000", {message: message}, null, null);-->
        <!--}-->

        <!--log1("ddd")-->

        <!--window.console = {-->

            <!--log: function (a) {-->

<!--//                log1(a);-->
            <!--},-->

            <!--warn: function (a) {-->
                <!--log1("warning " + a);-->
            <!--}-->


        <!--}-->
    <!--</script>-->

    <meta charset="UTF-8">
    <title>scenic 3d test</title>


    <link rel="shortcut icon" type="image/png" href="jasmine-standalone.4.21/lib/jasmine-2.4.1/jasmine_favicon.png">
    <link rel="stylesheet" href="jasmine-standalone.4.21/lib/jasmine-2.4.1/jasmine.css">
    <script src="jasmine-standalone.4.21/lib/jasmine-2.4.1/jasmine.js"></script>
    <script src="jasmine-standalone.4.21/lib/jasmine-2.4.1/jasmine-html.js"></script>
    <script src="jasmine-standalone.4.21/lib/jasmine-2.4.1/boot.js"></script>


    <link rel="stylesheet" href="jquerylib/jquery-ui.css">
    <script src="jquerylib/external/jquery/jquery.js"></script>
    <script src="jquerylib/jquery-ui.js"></script>


    <script src="gslib/three.include.js"></script>
    <script src="gslib/postprocessing.js"></script>
    <script src="gslib/TransformControls.js"></script>

    <script src="gslib/goodstyle_implement.js"></script>
    <script src="gslib/goodstyle_util3d.js"></script>
    <script src="gslib/goodstyle_three.js"></script>
    <script src="gslib/interface.test.js"></script>


    <script src="gslib/goodstyle_treeview.js"></script>
    <link rel="stylesheet" href="gslib/jquery.treeview.css">


    <script src="gslib/dat.gui.js"></script>


    <script src="business/index_business.js"></script>
    <script src="widget/widget.js"></script>


</head>
<body>


<div id="main_test" style="position: absolute  ;width: 79% ; left: 15%; height: 100% ; display: none">
    <div id="main_test_title" style="width: 100%;background-color: #ad37bb; "><span
            style="font-size: large">3D开发区域</span></div>
    <div id="resource" style="width: 10%  ; height: 95% ;float: left;background-color: #00bb00 "></div>
    <div id="container" style="width : 80%; height: 95%; display: inline-block ; margin-left: 0px; position: absolute;">
        <canvas id="rd_three" style="width: 100%; height: 100% ;"></canvas>
    </div>
    <div id="property"
         style="width: 10%;height: 95%;display: inline-block;margin-left: 0px;float: right;background-color: #00bb00">
        <div id="part1"></div>
        <div id="part2"></div>
    </div>
</div>

<script>
    (function main() {
        function getNumber(pxValue) {
            if (pxValue) {
                return parseInt(pxValue.slice(0, pxValue.length - 2));
            }
        }

        var startX, startY, currentLeft, currentTop;
        var showElement = document.getElementById("main_test");

        document.getElementById("main_test_title").addEventListener("mousemove", function (event) {

            if (event.shiftKey) {
                if (startX == undefined) {
                    startX = event.clientX;
                }
                if (startY == undefined) {
                    startY = event.clientY;
                }
                var offsetX = event.clientX - startX;
                var offsetY = event.clientY - startY;
                showElement.style.left = currentLeft + offsetX + "px";
                showElement.style.top = currentTop + offsetY + "px";
            } else {
                currentLeft = getNumber(showElement.style.left);
                currentTop = getNumber(showElement.style.top);
                startX = startY = undefined;
            }
            showElement.boundingClientRect = undefined;

        })

    })();
</script>

</body>


</html>

